// var rgbToHex = function(r, g, b) {
//   return ((r << 16) | (g << 8) | b).toString(16);
// }
var hexToRgb = function(hex, opacity) {
    return "rgba(" + parseInt("0x" + hex.slice(1, 3)) + "," + parseInt("0x" + hex.slice(3, 5)) + "," + parseInt("0x" + hex.slice(5, 7)) + "," + opacity + ")";
};

module.exports = {
    hexToRgb: hexToRgb
};